#ifndef SIMPLE_PID_H
#define SIMPLE_PID_H

typedef struct 
{
    float            error_prev; //!< last tracking error value
    float            output_prev;  //!< last pid output value
    float            integral_prev; //!< last integral component value
    unsigned long    timestamp_prev; //!< Last execution timestamp
}SimplePID_Inside_t;
 
typedef struct 
{
    float                   P;
    float                   I;
    float                   D;
    float                   output_ramp;      //输出值的最大变化速度    
    float                   limit;            //最大输出值
    SimplePID_Inside_t      inside;
}SimplePID_t;
float Simple_PIDController(SimplePID_t *handle, float error);
#endif // PID_H
